home *** CD-ROM | disk | FTP | other *** search
/ X User Tools / X User Tools (O'Reilly and Associates)(1994).ISO / sun4c / archive / xasteroi.z / xasteroi / bin / xasteroids < prev   
Text File  |  1994-09-29  |  497b  |  20 lines

  1. #!/bin/sh
  2. #cd /u5/grads/goetz/X
  3. if [ "$1" = "-s" ]
  4. then
  5.   /bin/cat xast.hs
  6. else
  7.   /bin/echo ""
  8.   /bin/cat xast.hs
  9.   /bin/echo ""
  10.   /bin/echo Type 'Q' to save your high score...
  11.   umask 77
  12.   score=`xast.exe | /bin/cut '-d ' -f5`
  13.   if [ "$score" != "" ]
  14.   then
  15.     (/bin/echo $score"    "$USER"        `/bin/date | /bin/sed 's/  / 0/g' | cut '-d ' -f1,2,3,6 | /bin/sed 's/ 0/  /g'`"; cat xast.hs) | /bin/sort +0rn -1 +5n +3M | head -10 > xast.hs2
  16.     /bin/mv -f xast.hs2 xast.hs
  17.     /bin/cat xast.hs
  18.   fi
  19. fi
  20.